package org.apache.ibatis.usage;

import org.apache.ibatis.usage.base.BaseJdbcOperator;
import org.apache.ibatis.usage.base.MybatisJdbcOperator;
import org.apache.ibatis.usage.model.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

/**
 * @Name MybatisUsageApplication
 * @Description: [Mybatis 使用项目] 启动类
 * @Version v1.0.0
 * @Author: lichao
 * @Date: 2024-04-23 16:19:05
 **/
@SpringBootApplication
public class MybatisUsageApplication {

    public static void main(String[] args) throws Exception {
        // 1. 传统数据库连接操作
        // BaseJdbcOperator.run();
        // 2. 基于 Mybatis 组件的数据库连接操作
        MybatisJdbcOperator.run();
        // 3. 基于 Mybatis + Spring-Boot [Mybatis-Spring-Boot-Starter] 组件的整合操作
        // SpringApplication.run(MybatisUsageApplication.class);
    }

}

